package com.it.day4;

import java.util.ArrayList;

/**
 * ClassName: GCLogTest
 * Description: GC日志测试
 *  -Xms60m -Xmx60m -XX:SurvivorRatio=8 -Xlog:gc -Xloggc:./logs/gc.log
 * @Author: csx
 * @Create: 2025/4/28 - 17:19
 * @version: v1.0
 */
public class GCLogTest {
    public static void main(String[] args) {
        ArrayList<byte[]> list = new ArrayList<>();

        for (int i = 0; i < 500; i++) {
            byte[] arr = new byte[1024 * 100];  //100KB
            list.add(arr);
            try {
                Thread.sleep(50);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }
}
